﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Light.IoC
{
    /// <summary>
    /// IoC工厂，用来创建工厂实例
    /// </summary>
    public class Factory
    {

        private static IFactory _current = null;

        /// <summary>
        /// 创建工厂实例
        /// </summary>
        static Factory()
        {
            if (_current == null)
                _current = new CastleFactory();
        }

        /// <summary>
        /// 当前组件工厂，用来创建组件实例
        /// </summary>
        public static IFactory Current
        {
            get { return Factory._current; }
            set { Factory._current = value; }
        }
        
    }
}
